package cn.com.klun.tjy.other.zkUsed;


import org.apache.curator.RetryPolicy;
import org.apache.curator.RetrySleeper;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.zookeeper.server.quorum.Election;
import org.apache.zookeeper.server.quorum.QuorumPeer;
import org.apache.zookeeper.server.quorum.Vote;

import javax.xml.bind.Element;

public class CuratorTest {
    RetryPolicy retryPolicy = new RetryPolicy() {
        @Override
        public boolean allowRetry(int i, long l, RetrySleeper retrySleeper) {
            return false;
        }
    };
    CuratorFramework zkc = CuratorFrameworkFactory.newClient("",retryPolicy);


    Election e = new Election() {
        @Override
        public Vote lookForLeader() throws InterruptedException {
            return null;
        }

        @Override
        public void shutdown() {

        }
    };
    // QuorumPeer.createElectionAlgorithm();
}
